<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
	
	<?php foreach($goods as $k=>$v):?>

	<div class="shop_list">
		<p class="subject">商品名称：<?php echo $v['goods_name'];?></p>
		<p>购买数量：<?php echo $v['qty'];?></p>
		<p>商品单价：<?php echo $v['shop_price'];?></p>
		<p class="total_fee">商品总价：<?php echo $v['total_fee'];?></p>
	<hr/>
	</div>
	<?php endforeach;?>
	<p id="subject"><?php echo $subject;?></p>
	<p id="out_trade_no"><?php echo $out_trade_no;?></p>
	<p id="total_fee"><?php echo $total_price;?></p>
	<input type="button" id="btn" value="立即支付">
	<div id="form" style="display:none"></div> 
	<script src="<?php echo base_url(),FRONT_DIR?>js/jquery.min.js"></script>
	<script type="text/javascript">
		$(function(){
			
			$("#btn").click(function(){
				
				$.ajax({
					 type: "post",
					 url: "<?php echo base_url(),'pay/index/payto';?>",
					 data: {subject:$("#subject").html(), out_trade_no:$("#out_trade_no").html(),total_fee:$("#total_fee").html()},
					 dataType: "json",
					 success: function(data){
								 $('#form').html(data);
							  }
					});
				
				})
				
			
			
		})
	</script>
</body>
</html>